#ifndef _2DCAMERA_H_
#define _2DCAMERA_H_

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

class Direct3D;
class TextureManager;
class ObjectInterface;

class Camera2D
{
	double	m_CameraX;
	double	m_CameraY;
	double	m_CameraWidth;
	double	m_CameraHeight;

	Direct3D*			m_D3D;
	TextureManager*		m_TM;
	ObjectInterface*	m_Target;

public:
	Camera2D(void);
	~Camera2D(void);

	void	CreateCamera(double x, double y, double width, double height);
	void	Update(void);
	bool	Draw(int id, int x, int y, float xScale = 1.0f, float yScale = 1.0f, RECT* pSection = NULL,
		float rotCenterX = 0.0f, float rotCenterY = 0.0f, float rotation = 0.0f, DWORD color = 0xFFFFFFFF);
	void	TranslateCamera(double x = 0.0, double y = 0.0);

	// Accessors
	double	GetWidth(void);
	double	GetHeight(void);
	double	GetX(void);
	double	GetY(void);
	double	GetLocalX(double x);
	double	GetLocalY(double y);

	// Mutators
	void	SetWidth(double width);
	void	SetHeight(double height);
	void	SetX(double x);
	void	SetY(double y);
	void	SetD3D(Direct3D* d3d);
	void	SetTextureManager(TextureManager* textureManager);
	void	SetTarget(ObjectInterface* target);
};

#endif // _2DCAMERA_H_